Skip to content

Add ChatOptions support to ChatAgentConfig#6

Merged
JordanMarr merged 1 commit intoJordanMarr:mainfrom
OnurGumus:feature/chat-options
Mar 26, 2026
Merged

Add ChatOptions support to ChatAgentConfig#6
JordanMarr merged 1 commit intoJordanMarr:mainfrom
OnurGumus:feature/chat-options

Conversation

@OnurGumus
Copy link
Contributor

Summary

  • Adds ChatOptions field to ChatAgentConfig and ChatAgent.withChatOptions pipeline function
  • Wraps IChatClient with a delegating client that merges default ChatOptions (temperature, top-p, model, etc.) into every call
  • Per-call options from MAF override the defaults where present

Motivation

ChatClientAgent's constructor doesn't accept both instructions/tools and ChatOptions. This provides a clean way to set options like temperature at the agent config level.

Usage

ChatAgent.create instructions
|> ChatAgent.withChatOptions (ChatOptions(Temperature = 0.0f))
|> ChatAgent.withTools tools
|> ChatAgent.build chatClient

ChatClientAgent's constructor doesn't accept both instructions/tools
and ChatOptions, so this wraps the IChatClient with a delegating
client that merges default ChatOptions into every call. Per-call
options from MAF override the defaults where present.
@OnurGumus
Copy link
Contributor Author

@JordanMarr any love to this?

@JordanMarr
Copy link
Owner

@JordanMarr any love to this?

For some reason GitHub just lit up my notification box this morning, so this is the first time I’m even seeing your PR.

I’ll check it out. Looks good though.

@JordanMarr JordanMarr closed this Mar 26, 2026
@JordanMarr JordanMarr reopened this Mar 26, 2026
@JordanMarr JordanMarr merged commit fd85f49 into JordanMarr:main Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants